package com.gaoyi.basemodule.baseact;

import android.content.Context;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.viewbinding.ViewBinding;


public abstract class BaseViewActivity<V extends ViewBinding> extends BasePermissionActivity {

    protected V mBinding;
    protected Context mContext;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mBinding = getViewBinding();
        setContentView(mBinding == null ? null : mBinding.getRoot());
        mContext = this;
        initData();
    }

    protected abstract void initData();

    protected abstract V getViewBinding();
}
